The present invention relates to mass storage devices for computers and, more particularly, to a USB mass storage device that also includes directly executable boot code.
FIG. 1 is a partial schematic block diagram of a generic prior art personal computer (PC) 10. PC 10 includes various internal components: a central processing unit (CPU) 12, a non-volatile Basic Input Output System (BIOS) device 14, a random access memory (RAM) 16, a hard disk controller 20, several input-output controllers 24 (of which only one is shown) and a USB hub 26, all communicating with each other via an internal bus 30. Hard disk controller 20 drives a hard disk 18. Input-output controller 24 drives an input/output device such as a display screen, a keyboard or a mouse. USB hub 26 facilitates communication with reversibly attachable peripheral devices according to the USB standard protocol, via a USB connector 28.
When PC 10 is powered up, CPU 12 starts fetching code instructions from an address that is predetermined by the manufacturer of CPU 12. For example, in the original IBM PC that used the Intel 8088 microprocessor as its CPU 12, that address was 0FFFF0H. In other microprocessors, the address is 0. In still other microprocessors, the address is selectable by a system designer from a small number of alternatives by strapping some of the pins of the microprocessor during power-up to specific configurations of high and low voltage values.
PC 10 must include a component that responds to these initial CPU 12 fetch cycles and returns the correct commands (opcodes) that cause CPU 12 to start the powering-up, or “booting”, process. If such a component is absent, then CPU 12 receives unpredictable or meaningless data that CPU 12 treats as executable code. Within a few machine cycles, CPU 12 either will be stuck or will be executing useless commands and will be unable to proceed beyond this stage. BIOS 14 is that component.
BIOS 14 is a directly executable, non-volatile memory device, such as a read-only memory or a flash memory, that contains the initial code (“boot code”) that CPU 12 must execute. Typically, the bulk of the operating software of PC 10 (including the operating system (OS) of PC 10 and application programs such as word processors) does not reside in BIOS 14, which is much to small to store all this software, but rather in a high-capacity mass storage device such as hard disk 18. Unlike BIOS 14, hard disk 18 is not directly executable. In addition, hard disk 18 must be accessed by CPU 12 via hard disk controller 20. RAM 16 serves as the directly executable device from which code stored on hard disk 18 is executed: code stored on hard disk 18 is copied from hard disk 18 to RAM 16 and only then is executed by CPU 12. One of the functions of the boot code of BIOS 14 is to instruct hard disk controller 20 to fetch code from hard disk 18, to load the fetched code into RAM 16 and to direct CPU 12 to start executing the loaded code. The portion of the boot code that performs the function of reading from the hard disk is called the “hard disk driver”.
Typically, the code that is loaded by BIOS 14 is the OS, or at least a part of the OS that is called the “kernel”. Loading the OS typically is done in several stages. First, BIOS 14 loads a first portion of the OS that is called the “boot loader”, then the boot loader loads a second portion of the OS, etc. until all the required OS code is available in RAM 16. Once the OS is loaded, the OS takes control of PC 10 and executes all the tasks that are to be executed by PC 10. In some PCs 10, BIOS 14 is not used after this initial stage: all the functionality of BIOS 14 is replaced by the OS. For example, the OS includes its own hard disk driver that is used henceforth instead of the hard disk driver of BIOS 14. In other PCs 10, the OS continues to rely on some services of BIOS 14 even after the system is fully up. For example, the OS hard disk manager could use the hard disk driver of BIOS 14 to carry out low-level disk access functions. In any case, when PC 10 is reset, either a cold reset by turning the power off and on again or a warm reset by requesting system re-initialization from the keyboard, CPU 12 again jumps to the initial start-up address and BIOS 14 responds by providing the correct initial code bytes for repeating the full system booting process.
Most commonly, a magnetic hard disk is used as hard disk 18. In some applications, for example when high reliability or compactness is desired, a flash disk sometimes is used for mass storage. Magnetic hard disks 18 and flash hard disks 18 require different kinds of controllers 20 and consequently different software disk drivers. In addition, NAND flask disks, like magnetic hard disks, are not directly executable. NOR flash disks are directly executable, but are less frequently used as hard disks 18 because of cost and write performance considerations.
In recent years, USB disks have come into use as mass storage devices. A USB disk is a mass storage device that interfaces to a host device using the USB standard protocol. One major advantage of such a device is that it can be disconnected from the host and reconnected to the host even while the host is operating. So, for example, there is no need to power down PC 10 to attach a USB disk to PC 10 at USB connector 28 or to detach a USB disk from USB connector 28. Some USB disks, such as the flash-based DiskOnKey™ available from M-Systems Flash Disk Pioneers, Ltd. of Kfar Saba, Israel, are small and pocketable, and so are very convenient to use as removable and portable mass storage media. Because the USB protocol is a serial protocol that is not compatible with direct execution, USB disks are not directly executable by CPU 12. USB disks require a driver for accessing their contents. Such a driver typically is part of the OS. For example, all Microsoft Windows™ operating systems, from Windows 98™ onwards, include a USB driver.
Some PC vendors claim that they can boot their systems from a USB disk. What they really mean is that the USB disk assumes the role of hard disk 18: the OS resides on the USB disk, is loaded to RAM 16 from the USB disk and is executed from RAM 16. Obviously, such a system must include a separate BIOS 14 and this BIOS 14 must include a USB driver. Otherwise, there is no way to access the OS code in the USB disk. There is currently no way to boot a system from a USB disk without the system including a separate BIOS 14 with its own USB driver. This is why some PCs 10 do not support booting from USB disks: their BIOSs 14 either completely lack USB support or lack support for USB disks (the USB “Mass Storage Class” functionality).
There is thus a widely recognized need for, and it would be highly advantageous to have, a USB disk that allows a PC to boot without having a BIOS of its own. This would solve the compatibility and interoperability problems encountered today, when one never can be sure, when s/he inserts his/her portable USB disk into the USB connector of an unfamiliar PC and turns on the power, whether the PC will boot the OS that resides on the USB disk, will boot a different OS that resides on the PC's internal hard disk, or will not boot at all. Additionally, such a “true boot” device could be used as a security key for operating a computer. Powering up a computer without such a bootable USB disk inserted in the USB connector would not render the computer operable.